In mpris we only emit "player-added" for players that can actually play,
but during NotificationBox and MessageList initialization we add them all,
including those not having being technically added.
And this may be a problem when locking the screen, since we do not want
players to show if they cannot play.
So, be consistent and expose publicly only the players that can play
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4183>
}
get players() {
- return [...this._players.values()];
+ return [...this._players.values()].filter(player => player.canPlay);
}
_addPlayer(busName) {